<!DOCTYPE html>
<!--suppress ALL -->
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>118，我给母校发红包</title>
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <title>118,和北大一同成长</title>
        <link rel="stylesheet" href="/static/css/frozen.css" th:src="@{/static/css/frozen.css}"/>
        <link rel="stylesheet" href="/static/css/pkuniversity.css" th:src="@{/static/css/pkuniversity.css}"/>
        <script src="/static/js/jquery-1.12.1.min.js" th:src="@{/static/js/jquery-1.12.1.min.js}"/>
        <script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    </head>
</head>
<body>
<section >
    <div class="main">
        <p class="p-top">已成功发起 <span class="zjlName" th:text="${call.name}"></span>的召集令 <span class="card" th:text="${call.giftBid}">0</span> 个红包召集令</p>
        <p>您是第 <span class="bth9b personNum" th:text="${sortMap.timeRank}"></span> 个发起召集令的人</p>
        <p>当前排名 <span class="bth9b rank" th:text="${sortMap.giftRank}"></span></p>
    </div>
    <div class="bgf redcard-money size30">
        <div class="width90 margin0auto">
            <section class="ui-panel ui-panel-pure">
                <h3 class="ui-border-b">召集令排行榜</h3>
                <table class="ui-table" id="items">
                    <thead>
                    <th></th>
                    <th>召集令名称</th>
                    <th>红包数</th>
                    </thead>
                    <tbody>
                        <tr th:each="item,status :${top10}"  th:if="${status.count lt 3}">
                            <td th:text="${status.count}"></td>
                            <td th:text="${item.name}"></td>
                            <td th:text="${item.giftCount}"></td>
                        </tr>
                        <tr th:each="item,status :${top10}"  class="moreorder" th:if="${status.count gt 2}" style="display: none">
                            <td th:text="${status.count}"></td>
                            <td th:text="${item.name}"></td>
                            <td th:text="${item.giftCount}"></td>
                        </tr>
                    </tbody>
                </table>

                <div class="textcenter" th:if="${#lists.size(top10)} gt 2" >点击加载更多</div>
            </section>
        </div>
    </div>
    <div class="rbtn give-redcard">邀请好友参与</div>

    <!-- 分享 -->
    <div id="share-float"  style="display:none;">
        <div class="container">
            <div class="share-doc">
                <img src="/static/img/fx.png" th:src="@{/static/img/fx.png}" />
            </div>
        </div>
    </div>
    <script>
        $(function(){
            $(".give-redcard").on("click",function(){
                $("#share-float").show();
            });

            $("#share-float").bind("click", function (e) {
                var $dom = $(e.srcElement || e.target) ;
                if(!$dom.closest(".container").length){
                    $("#share-float").hide()
                }
            });
        })
    </script>


        <script th:inline="javascript">

            $(".textcenter").on("click",function () {
                $(".moreorder").show();
                $(".textcenter").hide();
            });

        if (typeof WeixinJSBridge == "undefined") {
            if (document.addEventListener) {
                document.addEventListener('WeixinJSBridgeReady', wxfx, false);
            } else if (document.attachEvent) {
                document.attachEvent('WeixinJSBridgeReady', wxfx);
                document.attachEvent('onWeixinJSBridgeReady', wxfx);
            }
        } else {
            wxfx();
        }


        var shareapp_data = {};
        var sharetimeline_data = {};
        var nick = /*[[${user.realName}]]*/'';
        var call = /*[[${call.name}]]*/'';

        function wxfx(){
            wx.config({
                debug: false,
                appId: /*[[${wx_config_wxAppId}]]*/'',
                timestamp: /*[[${wx_config_timeStamp}]]*/'',
                nonceStr: /*[[${wx_config_nonceStr}]]*/'',
                signature: /*[[${wx_config_signature}]]*/'',
                jsApiList: [
                    'checkJsApi',
                    'onMenuShareTimeline',
                    'onMenuShareAppMessage',
                    'onMenuShareQQ',
                    'onMenuShareWeibo'
                ]
            });
                var title="";
                if(nick==null|| nick =="null" ||nick == ""){
                    title = "我";
                }else{
                   title = '我是【' + nick+ '】';
                }
                shareapp_data = {
                    title: title + '发起了【' + call + '】，喊你一起给母校发红包！',
                    desc: '北京大学118周年校庆活动',
                    link: 'http://'+ /*[[${globalHostName}+'/peking/gift-call/'+${gcId}+'/gift']]*/'' + '/peking/gift-call/' + callId + '/gift',
                    imgUrl: 'http://'+ /*[[${globalHostName}+'/static/img/pku.jpg']]*/''
                };
                sharetimeline_data = {
                    title: title + '发起了【' + call + '】，喊你一起给母校发红包！',
                    desc: '北京大学118周年校庆活动',
                    link: 'http://'+ /*[[${globalHostName}+'/peking/gift-call/'+${gcId}+'/gift']]*/'',
                    imgUrl: 'http://'+ /*[[${globalHostName}+'/static/img/pku.jpg']]*/''
                }
                wx.onMenuShareAppMessage(shareapp_data);
                wx.onMenuShareTimeline(sharetimeline_data);

        }
    </script>
</section>
</body>
</html>